<template>
  <div>
    <el-card>
      <div slot="header">目标检测</div>
      <div class="info">
        <div class="left">
          请选择无人机编号
          <el-select v-model="value" placeholder="无人机编号">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
        <div class="middle">
          请选择无人机任务编号
          <el-select v-model="value" placeholder="无人机任务编号">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
      </div>
      <div class="data">
        <el-table
          :data="tableData"
          :row-style="{ height: '40px' }"
          style="width: 100%; font-size: 22px"
          :header-cell-style="{ background: '#f4f3f9', color: '#606266' }"
        >
          <el-table-column
            prop="navid"
            label="无人机ID"
            width="500"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="task"
            label="任务编号"
            width="500"
            align="center"
          >
          </el-table-column>

          <el-table-column>
            <el-tooltip
              class="item"
              effect="dark"
              content="点击查看检测"
              placement="top-start"
            >
              <el-button
                type="primary"
                icon="el-icon-search"
                class="button"
                @click="dialogVisible = true"
                >查看检测结果</el-button
              >
            </el-tooltip>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <el-dialog
      title="检测结果"
      :visible.sync="dialogVisible"
      width="35%"
      :before-close="handleClose"
    >
      <div class="detectcontent">
        <div class="detectcontentheader">
          <span
            >共13张，当前是第1张,拍摄时间2022年10月13日7:52，经纬118.79°E，纬度：31.91°N</span
          >
          <el-button style="display: inline">下一张</el-button>
          <el-button style="display: inline">跳转</el-button>
          <div class="inputtype">
            <el-input style="display: inline"></el-input>
          </div>
        </div>
        <img src="../assets/result.jpg" class="resultphoto" />
        <div style="font-size: large">检测耗时：{{ detecttime }}</div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
  
  <script>
export default {
  data() {
    return {
      dialogVisible: false,
      detecttime: "1.542s",
      //样例数据
      tableData: [
        {
          navid: "298CHBKROAOU5P",
          task: "1",
        },
        {
          navid: "298CHBKROAOU5P",
          task: "2",
        },
        {
          navid: "298CHBKROAOU5P",
          task: "3",
        },
        {
          navid: "298CHBKROAOU5P",
          task: "4",
        },
        {
          navid: "298CHBKROAOU5P",
          task: "5",
        },
        {
          navid: "MO782B1JOI8SAF",
          task: "6",
        },
        {
          navid: "MO782B1JOI8SAF",
          task: "7",
        },
        {
          navid: "DMQ013SFA91NAS",
          task: "8",
        },
      ],
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
  },
};
</script>
  
  <style scoped>
.info {
  height: 80px;
}
.button {
  font-size: 20px;
}
.left {
  margin-left: 80px;
  margin-top: 20px;
  height: 60px;
  width: 500px;
  float: left;
}
.middle {
  margin-top: 20px;
  height: 60px;
  width: 500px;
  float: left;
}
.right {
  margin-top: 20px;
  height: 60px;
  width: 500px;
  float: left;
}
.data {
  margin-left: 80px;
  margin-top: 60px;
  height: 900px;
}
.detectcontent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
}
.detectcontentheader {
  width: auto;
}
.inputtype {
  display: inline-block;

  width: 100px;
  margin-left: 10px;
}
.resultphoto {
  width: 800px;
  height: 400px;
}
</style>
  